package com.itheima.a01myfile;

public class demo4 {
    public static void main(String[] args) {
        //定义数组
        int[] arr = {1, 2, 3, 4, 5, 6, 8, 9, 10};
        int max = SeeMax(arr);
        System.out.println(max);
    }

    public static int SeeMax(int[] arr) {
        int max = arr[0];
        for (int i = 0; i < arr.length; i++) {  
            if (arr[i] > max) {
                max = arr[i];
            }
        }
        return max;
    }
}
